package cn.lhf.cd.domain;

import javafx.beans.property.SimpleStringProperty;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;

public class RecordModel {
    private SimpleStringProperty date;
    private SimpleStringProperty out;
    private SimpleStringProperty in;
    private SimpleStringProperty other;

    public RecordModel() {
        date = new SimpleStringProperty();
        out = new SimpleStringProperty();
        in = new SimpleStringProperty();
        other = new SimpleStringProperty("");
    }

    public String getDate() {
        return date.get();
    }

    public SimpleStringProperty dateProperty() {
        return date;
    }

    public void setDate(Timestamp timestamp) {
        setDate(new SimpleDateFormat("yyyy年MM月dd日").format(timestamp));
    }

    public void setDate(String date) {
        this.date.set(date);
    }

    public String getOut() {
        return out.get();
    }

    public SimpleStringProperty outProperty() {
        return out;
    }

    public void setOut(String out) {
        this.out.set(out);
    }

    public String getIn() {
        return in.get();
    }

    public SimpleStringProperty inProperty() {
        return in;
    }

    public void setIn(String in) {
        this.in.set(in);
    }

    public String getOther() {
        return other.get();
    }

    public SimpleStringProperty otherProperty() {
        return other;
    }

    public void setOther(String other) {
        this.other.set(other);
    }
}
